package org.example.course.template;

import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import org.example.commonapi.dto.CourseInfoDto;
import org.example.commonapi.mapper.CourseMapper;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;

@Service
public class StudentCourseQuery extends AbstractCourseQueryTemplate {

    @Resource
    private CourseMapper courseMapper;

    @Override
    protected IPage<CourseInfoDto> doQuery(Page<CourseInfoDto> page,
                                           Integer state,
                                           String courseName,
                                           Long id) {
        return courseMapper.studentList(page, state, courseName, id);
    }
}